\section{Ether\+C\+AT Virtual T\+TY Interface}
\label{group__TTYInterface}\index{Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ ec\+\_\+tty\+\_\+operations\+\_\+t}
\begin{DoxyCompactList}\small\item\em Operations on the virtual T\+TY interface. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct ec\+\_\+tty \textbf{ ec\+\_\+tty\+\_\+t}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ ec\+\_\+tty\+\_\+t} $\ast$ \textbf{ ectty\+\_\+create} (const \textbf{ ec\+\_\+tty\+\_\+operations\+\_\+t} $\ast$ops, void $\ast$cb\+\_\+data)
\begin{DoxyCompactList}\small\item\em Create a virtual T\+TY interface. \end{DoxyCompactList}\item 
void \textbf{ ectty\+\_\+free} (\textbf{ ec\+\_\+tty\+\_\+t} $\ast$tty)
\begin{DoxyCompactList}\small\item\em Releases a virtual T\+TY interface. \end{DoxyCompactList}\item 
unsigned int \textbf{ ectty\+\_\+tx\+\_\+data} (\textbf{ ec\+\_\+tty\+\_\+t} $\ast$tty, uint8\+\_\+t $\ast$buffer, size\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Reads data to send from the T\+TY interface. \end{DoxyCompactList}\item 
void \textbf{ ectty\+\_\+rx\+\_\+data} (\textbf{ ec\+\_\+tty\+\_\+t} $\ast$tty, const uint8\+\_\+t $\ast$buffer, size\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Pushes received data to the T\+TY interface. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Typedef Documentation}
\mbox{\label{group__TTYInterface_gabf4bbf300a5c451d7fe82b65e17f097d}} 
\index{Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}!ec\+\_\+tty\+\_\+t@{ec\+\_\+tty\+\_\+t}}
\index{ec\+\_\+tty\+\_\+t@{ec\+\_\+tty\+\_\+t}!Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}}
\subsubsection{ec\+\_\+tty\+\_\+t}
{\footnotesize\ttfamily typedef struct ec\+\_\+tty \textbf{ ec\+\_\+tty\+\_\+t}}

\begin{DoxySeeAlso}{See also}
ec\+\_\+tty 
\end{DoxySeeAlso}


Definition at line 52 of file ectty.\+h.



\subsection{Function Documentation}
\mbox{\label{group__TTYInterface_ga64244c8ea384d633c3f8edfadeecffb3}} 
\index{Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}!ectty\+\_\+create@{ectty\+\_\+create}}
\index{ectty\+\_\+create@{ectty\+\_\+create}!Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}}
\subsubsection{ectty\+\_\+create()}
{\footnotesize\ttfamily \textbf{ ec\+\_\+tty\+\_\+t}$\ast$ ectty\+\_\+create (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+tty\+\_\+operations\+\_\+t} $\ast$}]{ops,  }\item[{void $\ast$}]{cb\+\_\+data }\end{DoxyParamCaption})}



Create a virtual T\+TY interface. 


\begin{DoxyParams}{Parameters}
{\em ops} & Set of callbacks. \\
\hline
{\em cb\+\_\+data} & Arbitrary data, that is passed to any callback.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the interface object, otherwise an E\+R\+R\+\_\+\+P\+TR value. 
\end{DoxyReturn}
\mbox{\label{group__TTYInterface_ga03d764370f5d76bec71412ea1124a156}} 
\index{Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}!ectty\+\_\+free@{ectty\+\_\+free}}
\index{ectty\+\_\+free@{ectty\+\_\+free}!Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}}
\subsubsection{ectty\+\_\+free()}
{\footnotesize\ttfamily void ectty\+\_\+free (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+tty\+\_\+t} $\ast$}]{tty }\end{DoxyParamCaption})}



Releases a virtual T\+TY interface. 


\begin{DoxyParams}{Parameters}
{\em tty} & T\+TY interface. \\
\hline
\end{DoxyParams}
\mbox{\label{group__TTYInterface_ga71580e6fbab0aa678073c139bf516dae}} 
\index{Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}!ectty\+\_\+tx\+\_\+data@{ectty\+\_\+tx\+\_\+data}}
\index{ectty\+\_\+tx\+\_\+data@{ectty\+\_\+tx\+\_\+data}!Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}}
\subsubsection{ectty\+\_\+tx\+\_\+data()}
{\footnotesize\ttfamily unsigned int ectty\+\_\+tx\+\_\+data (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+tty\+\_\+t} $\ast$}]{tty,  }\item[{uint8\+\_\+t $\ast$}]{buffer,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



Reads data to send from the T\+TY interface. 

If there are data to send, they are copied into the {\itshape buffer}. At maximum, {\itshape size} bytes are copied. The actual number of bytes copied is returned.

\begin{DoxyReturn}{Returns}
Number of bytes copied. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em tty} & T\+TY interface. \\
\hline
{\em buffer} & Buffer for data to transmit. \\
\hline
{\em size} & Available space in {\itshape buffer}. \\
\hline
\end{DoxyParams}
\mbox{\label{group__TTYInterface_ga9d2e53ca7492e1a71a26cbbc7d51af52}} 
\index{Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}!ectty\+\_\+rx\+\_\+data@{ectty\+\_\+rx\+\_\+data}}
\index{ectty\+\_\+rx\+\_\+data@{ectty\+\_\+rx\+\_\+data}!Ether\+C\+A\+T Virtual T\+T\+Y Interface@{Ether\+C\+A\+T Virtual T\+T\+Y Interface}}
\subsubsection{ectty\+\_\+rx\+\_\+data()}
{\footnotesize\ttfamily void ectty\+\_\+rx\+\_\+data (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+tty\+\_\+t} $\ast$}]{tty,  }\item[{const uint8\+\_\+t $\ast$}]{buffer,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



Pushes received data to the T\+TY interface. 


\begin{DoxyParams}{Parameters}
{\em tty} & T\+TY interface. \\
\hline
{\em buffer} & Buffer with received data. \\
\hline
{\em size} & Number of bytes in {\itshape buffer}. \\
\hline
\end{DoxyParams}
